package com.weirong.smartvault.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;

import lombok.Getter;
import lombok.Setter;

@Setter
@Getter
@Entity
@Table(name="equipment_res_for_command_log")
public class CommandResponse {

    @Id
    @GeneratedValue(strategy= GenerationType.AUTO)
    private Integer id;
    
    @Column(name = "response_type")
    private String responseType;

    @Column(name = "res_time")
    private Date res_time;

    @ManyToOne
	@JoinColumn(name = "command_id")
	@NotFound(action = NotFoundAction.IGNORE)
	private Command command;

}
